-
Notifications
You must be signed in to change notification settings - Fork 20
[FSSDK-11546] holdout + decision service impl. #386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FSSDK-11546] holdout + decision service impl. #386
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds holdout support to the Optimizely .NET SDK's decision service, enabling the SDK to evaluate holdouts (experiments that exclude users from treatment) alongside existing experiments and rollouts.
- Refactored the inheritance hierarchy to use
ExperimentCore
as the base class for both experiments and holdouts - Implemented holdout evaluation logic in the decision service with proper priority ordering (holdouts → experiments → rollouts)
- Added comprehensive test coverage for holdout functionality including bucketing, decision reasons, and user context operations
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
ExperimentCore.cs | Added base class with common experiment/holdout properties and moved shared logic from Experiment class |
Holdout.cs | Modified to override LayerId property to always return empty string as holdouts don't belong to layers |
Experiment.cs | Removed duplicate properties now inherited from ExperimentCore |
DecisionService.cs | Added GetDecisionForFlag method implementing holdout evaluation with proper priority ordering |
Bucketer.cs | Updated to accept ExperimentCore instead of Experiment for holdout compatibility |
FeatureDecision.cs | Added holdout decision source constant and updated to use ExperimentCore |
Various other files | Updated method signatures to use ExperimentCore for holdout compatibility |
Test files | Added comprehensive holdout test coverage including bucketing, decision service, and user context tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, few comments added
Summary
Added holdout support in decision service.
Test plan
Tests: Comprehensive tests addition
Issues
FSSDK-11546